package com.bju.service.impl;

import com.bju.bean.User;
import com.bju.mapper.UserMapper;
import com.bju.service.UserService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class UserServiceImpl implements UserService {

    @Resource
    private UserMapper userMapper;

    @Override
    public User login(String username, String password) {

        return userMapper.login(username,password);
    }

    @Override
    public void register(User user) throws Exception {
        userMapper.register(user);
    }

    @Override
    public List<User> queryUsers() {
        return userMapper.queryUsers();
    }

    @Override
    public void updateUser(User user) {
        userMapper.updateUser(user);
    }
}
